package cn.doitedu.eagle.functions;

import cn.doitedu.eagle.beans.LogBean;
import com.alibaba.fastjson.JSON;
import org.apache.flink.api.common.functions.MapFunction;

/***
 * @author 涛哥
 * @nick_name "deep as the sea"
 * @contack qq:657270652 wx:doit_edu
 * @site www.51doit.cn
 * @date 2021/3/25
 * @desc 原始json格式日志数据转LogBean格式
**/
public class Json2BeanMapFunction implements MapFunction<String, LogBean> {
    @Override
    public LogBean map(String s) throws Exception {
        LogBean bean = JSON.parseObject(s, LogBean.class);
        return bean;
    }
}
